var ajax = new XMLHttpRequest();
var matches = {};
var lsArr = $('#oTableContainer_1 > #tmplTable>tbody>tr');
var point;
for (var i = 0; i < lsArr.length; i++) {
    var type = $(lsArr[i]).attr('id');
    if (type) {
        var mtype = type.split('_');

        if (mtype[0] == 'e') {
            var zhu = $(lsArr[i]).find('.FavTeamClass').eq(0).text();
            var ke = $(lsArr[i]).find('.UdrDogTeamClass').eq(0).text();
            if(zhu){
                // console.log(zhu);
                var qcpk=$(lsArr[i]).find('td:nth-child(5) > .line_divL > span:nth-child(1)').eq(0).text();
                var qcdpl=$(lsArr[i]).find('td:nth-child(5) > .line_divR >.UdrDogOddsClass').eq(0).text();
                var qcxpl=$(lsArr[i]).find('td:nth-child(5) > .line_divR >.UdrDogOddsClass').eq(1).text();
                var bcpk=$(lsArr[i]).find('td:nth-child(8) >.line_divL > span:nth-child(1)').eq(0).text();
                var bcdpl=$(lsArr[i]).find('td:nth-child(8) >.line_divR >.UdrDogOddsClass').eq(0).text();
                var bcxpl=$(lsArr[i]).find('td:nth-child(8) >.line_divR >.UdrDogOddsClass').eq(1).text();
                // console.log(qcpk,'-',qcdpl,'-',qcxpl);
                if(qcpk){
                    if(!matches[point]['全'+qcpk]) matches[point]['全'+qcpk]={};
                    matches[point]['全'+qcpk]={
                        d:qcdpl,
                        x:qcxpl
                    }
                }
                if(bcpk){
                    if(!matches[point]['半'+bcpk]) matches[point]['半'+bcpk]={};
                    matches[point]['半'+bcpk]={
                        d:bcdpl,
                        x:bcxpl
                    }
                }
            }
            
        }else {
            var ls = $(lsArr[i]).find('td').eq(1).text();
            if(ls){
                // console.log(ls);
                if(!matches[ls]) matches[ls]={};
                point=ls;
            }
            
        }
    }
}
console.log(matches);
ajax.open('get', 'http://127.0.0.1:8360/index/test?p=' +matches);
ajax.send();
ajax.onreadystatechange = function () {
    if (ajax.readyState == 4 && ajax.status == 200) {
        console.log(ajax.responseText);
    }
}